<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        Tooltip <span class="subitem">Tooltip Global</span>
    </ui:define>

    <ui:define name="description">
        Global tooltip binds to clickable elements with title attributes. Ajax updates are supported as well, meaning
        if target component is updated with ajax, tooltip can still bind.
    </ui:define>

    <ui:param name="documentationLink" value="/components/tooltip"/>
    <ui:param name="widgetLink" value="Tooltip-1"/>

    <ui:define name="implementation">
        <div class="card">
            <p:tooltip/>

            <h:form>
                <h:panelGrid columns="2" cellpadding="10">
                    <h:outputText value="Input: "/>
                    <p:inputText pt:data-tooltip="Tooltip for an input"/>

                    <h:outputText value="Link: "/>
                    <h:outputLink value="#" pt:data-tooltip="Tooltip for a link">
                        <h:outputText value="About"/>
                    </h:outputLink>

                    <h:outputText value="Button: "/>
                    <p:commandButton value="Update" pt:data-tooltip="Update components" update="@parent"/>
                </h:panelGrid>
            </h:form>
        </div>
    </ui:define>

</ui:composition>
